import time

from celery import Celery

broker_url = 'amqp://admin:admin123@192.168.184.145:5672'
backend = 'redis://localhost:6379/2'

app = Celery('celery_test', broker=broker_url, backend=backend)


@app.task
def hello(name):
    """

    :param name:
    :return:
    """
    time.sleep(10)
    print(name)
    return name